package com.zch.rpc.client.controller;

import com.zch.rpc.client.fegin.HelloFegin;
import com.zch.rpc.core.annotation.RpcReference;
import com.zch.rpc.deamo.api.DemoService;
import com.zch.rpc.deamo.api.dto.UserDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @Auther: zch
 * @Date: 2019/1/7 17:57
 * @Description:  基于facade 接口依赖
 */
@RestController
public class DemoController {
    @RpcReference
    private DemoService demoService;



    /**
     * facade 接口依赖的测试
     * @param name
     * @return
     */
    @GetMapping(value = "/facadeSay")
    public Object sayHi(String name){
        UserDTO userDTO=demoService.sayHi( name);
        return userDTO;
    }


}
